Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(forms): handle string with and without line boundary on pattern validator #19256

Closed
wants to merge 1 commit into from

Conversation

ghetolay
Copy link
Contributor

@ghetolay ghetolay commented Sep 18, 2017

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Validator pattern only works with string without line boundaries (^ & $), the validator will then add them itself to the string automatically. But today wasn't the first time I helped someone because those boundaries characters were already present on the string and so the validator was failing.

Issue Number: N/A

What is the new behavior?

I think we can be a bit smarter here and only add those boundaries characters if they're missing.
It's easy enough and has no impact.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kara kara added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Jan 11, 2018
@ngbot
Copy link

ngbot bot commented Jan 11, 2018

I see that you just added the PR action: merge label. It won't do anything good though, because the following checks are still failing:

  • status failing/pending (code-review/pullapprove)

If you want your PR to be merged, it has to pass all the checks. But if you have a good reason to want to merge this, please contact the caretaker to let them know.

alexeagle pushed a commit that referenced this pull request Jan 16, 2018
@alexeagle alexeagle closed this in 54bf179 Jan 16, 2018
ghetolay added a commit to ghetolay/angular that referenced this pull request Jan 18, 2018
ghetolay added a commit to ghetolay/angular that referenced this pull request Jan 18, 2018
@ghetolay ghetolay deleted the feat_validator_pattern branch January 18, 2018 23:06
mhevery pushed a commit that referenced this pull request Jan 24, 2018
mhevery pushed a commit that referenced this pull request Jan 24, 2018
jbogarthyde pushed a commit to jbogarthyde/angular that referenced this pull request Feb 23, 2018
jbogarthyde pushed a commit to jbogarthyde/angular that referenced this pull request Feb 23, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: forms cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants